//
//  TestScrollViewController.m
//  HOrangiOS
//
//  Created by YOrange on 2018/5/3.
//  Copyright © 2018年 YOrange. All rights reserved.
//

#import "TestScrollViewController.h"

@interface TestScrollViewController ()
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (strong, nonatomic) NSArray *data;

@end

@implementation TestScrollViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.data = @[];//@[@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈",@"哈哈"];
    [self configUI];
    //[self configTableView:self.tableView nibName:@"" identifier:@"cell"];
    [self configEmptyView:self.tableView img:nil title:@"空数据" color:nil];
    [self initMJRefreshScrollView:self.tableView];
    // Do any additional setup after loading the view from its nib.
}

-(void)configUI{
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.data.count;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    cell.textLabel.text = self.data[indexPath.row];
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
